/*! \file Primitive.cpp
 *	\brief 
 *
 *	created:	2010/12/13
 *	created:	13:12:2010   17:26
 *	filename: 	C:\src\tactics-engine\libs\gd_dx11\Primitive.cpp
 *	file path:	C:\src\tactics-engine\libs\gd_dx11
 *	file base:	Primitive
 *	file ext:	cpp
 *	author:		Vitalii Trubchaninov
 *				vitalii.trubchaninov@ubisoft.com
 */
#include "gd_dx11/stdafx.h"
#include "gd_dx11/Primitive.h"

#include <gd/IndexBuffer.h>

#include "gd_dx11/DeviceContext.h"

namespace tt{
namespace gd_dx11{

Primitive::Primitive()
{

}

Primitive::~Primitive()
{

}

void Primitive::onApply( gd::DeviceContext* deviceContext )
{
	Base::onApply(deviceContext);

	DeviceContext* dx11DeviceContext = getDx11Context(deviceContext);

	UInt indicesCount = indexBuffer()->indicesCount();
	dx11DeviceContext->d3dContext()->DrawIndexed(indicesCount, 0, 0);
}

} //namespace gd_dx11
} //namespace tt

